<template>
    <div class="timeModal-wrapper" style="left: 0px !important;">
        <!-- <p>请至少输入一个日期</p> -->
        <el-row>
            <el-col :span="24" style="margin-bottom:15px">
                <span>开始时间：</span>
                <el-date-picker value-format="yyyy/MM/dd HH:mm:ss" format="yyyy/MM/dd HH:mm:ss" v-model="beginTime"
                    type="datetime" placeholder="开始日期">
                </el-date-picker>
            </el-col>
            <el-col :span="24" style="margin-bottom:15px">
                <span>结束时间：</span>
                <el-date-picker value-format="yyyy/MM/dd HH:mm:ss" format="yyyy/MM/dd HH:mm:ss" v-model="endTime"
                    type="datetime" placeholder="结束日期">
                </el-date-picker>
            </el-col>
            <el-col :span="14" :offset="12">
                <el-button type="primary" size="small" @click="sure">确 定</el-button>
                <el-button type="" size="small" @click="cancel">取 消</el-button>
            </el-col>
        </el-row>
    </div>
</template>

<script>
import {
    dateTimeFormatter
} from '../util';
export default {
    components: {

    },
    data () {
        return {
            beginTime: dateTimeFormatter(new Date(),'yyyy/MM/dd hh:mm:ss'),
            endTime:  dateTimeFormatter(new Date(),'yyyy/MM/dd hh:mm:ss')
        }
    },
    computed: {

    },
    watch: {

    },
    created () {

    },
    mounted () {

    },
    methods: {
        sure () {
            this.$emit('sure', { beginTime: this.beginTime, endTime: this.endTime })
        },
        cancel () {
            this.$emit('cancel')
        }
    },
    activated () { },
}
</script>

<style lang='scss' scoped>
.timeModal-wrapper {
    width: 290px;
    position: absolute;
    background: #FFF;
    min-width: 150px;
    border: 1px solid #EBEEF5;
    z-index: 2000;
    color: #606266;
    line-height: 1.4;
    //text-align: justify;
    font-size: 14px;
    box-shadow: 0 2px 12px 0 rgb(0, 0, 0, 10%);
    word-break: break-all;
    padding: 12px;
    height:30px;
    line-height: 30px;
    }
</style>
